/* tslint:disable:jsdoc-format max-line-length */
// warning: Generated code! Do not change!
var App;
(function (App) {
    var Servises;
    (function (Servises) {
        "use strict";
        var AjaxHelper = (function () {
            function AjaxHelper(baseUrl) {
                this.baseUrl = baseUrl;
                this.$http = angular.injector(["ng"]).get("$http");
                if (baseUrl.match(/\/$/)) {
                    baseUrl += "/";
                }
            }
            AjaxHelper.prototype.request = function (url, httpVerb, data) {
                var config = {
                    url: this.baseUrl + url,
                    cache: false,
                    method: httpVerb
                };
                if (data) {
                    config.data = data;
                }
                return this.$http(config).then(function (response) {
                    return response.data;
                });
            };
            return AjaxHelper;
        })();
        Servises.AjaxHelper = AjaxHelper;
        var ServerProxy = (function () {
            function ServerProxy(baseUrl) {
                if (baseUrl === void 0) { baseUrl = ""; }
                this.baseUrl = baseUrl;
            }
            ServerProxy.prototype.Get = function () {
                return new AjaxHelper(this.baseUrl).request("api/server/Get", "GET");
            };
            ServerProxy.prototype.GetServerById = function (id) {
                return new AjaxHelper(this.baseUrl).request("api/server/GetServer?id=" + id, "GET");
            };
            ServerProxy.prototype.GetServerByName = function (name) {
                return new AjaxHelper(this.baseUrl).request("api/server/GetServer?name=" + encodeURI(name), "GET");
            };
            ServerProxy.prototype.StartServerById = function (id) {
                return new AjaxHelper(this.baseUrl).request("api/server/StartServer?id=" + id, "GET");
            };
            ServerProxy.prototype.SetupServerById = function (id) {
                return new AjaxHelper(this.baseUrl).request("api/server/SetupServer?id=" + id, "GET");
            };
            return ServerProxy;
        })();
        Servises.ServerProxy = ServerProxy;
    })(Servises = App.Servises || (App.Servises = {}));
})(App || (App = {}));
//# sourceMappingURL=ServerProxy.js.map